﻿using AiXiu.Model;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace AiXiu.IBLL
{
    /// <summary>
    /// 视频业务管理接口
    /// </summary>
    public interface IVideoManager
    {
        /// <summary>
        /// 待上传视频
        /// </summary>
        /// <param name="userId">用户id</param>
        /// <param name="fileName">文件名</param>
        /// <param name="headline">标题名</param>
        /// <param name="location">位置</param>
        /// <returns></returns>
        CreateUploadVideoResult ToBeUpload(int userId,string fileName,string headline,string location=null);

        /// <summary>
        /// 更新视频，返回本次更新的数量
        /// </summary>
        /// <returns></returns>
        int UpdateVideos();

        /// <summary>
        /// 根据用户id获取视频列表
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<TBVideos> GetVidesByUserId(int userId);

        /// <summary>
        /// 根据视频id删除视频
        /// </summary>
        /// <param name="videoId"></param>
        void DeleteVideo(string videoId);

        /// <summary>
        /// 获取视频列表
        /// </summary>
        /// <returns></returns>
        List<TBVideos> GetVideos();

        /// <summary>
        /// 通过视频Id获取视频信息
        /// </summary>
        /// <param name="videoId"></param>
        /// <returns></returns>
        TBVideos GetVideoByVideoId(string videoId);

        /// <summary>
        /// 初始化播放
        /// </summary>
        /// <param name="videoId">视频Id</param>
        /// <returns></returns>
        GetPlayInfoResult InitPlay(string videoId);
    }
}